<?php ob_start();
require('includes/connect.php');
    	$catid = $_POST["catid"];
    	$cat = $_POST["cat"];

$sql="Update categories set `category`='$cat' where category_id=".$catid;
$result=mysql_query($sql);
		
		if($result)
						{
	
					header("location:category.php");
		}
	else {
		//header("location:edituser.php");
		echo mysql_error();
	}
	
ob_flush();	?>
